

#include "Box2D.h"
#include "../Framework/Location.h"

#ifndef MCGEERWALKER_TEST_H
#define MCGEERWALKER_TEST_H



class McGeerWalker 
{
public:
	McGeerWalker(b2World* newWalkerWorld);

private:
	float radianToDegreesConst;
	float groundAngle;
	float groundFriction;

	float footSize;
	float footDensity;
	float calfHeight;
	float calfWidth;
	float thighHeight;
	float thighWidth;
	float pelvisHeight;
	float pelvisWidth;
	float kneeUpperLimit;
	float kneeLowerLimit;
	float hipUpperLimit;
	float hipLowerLimit;

	b2World* walkerWorld;
	b2Body	*Ground, *LFoot, *RFoot, *LThigh, *RThigh, *Pelvis;
	b2RevoluteJoint		*LKnee, *RKnee, *Hip;
	
	void makeGround();
	void makeBody(float xLocation);
	void makeHip();
	void makeLeftKnee();
	void makeRightKnee();
	void makeLeftThigh(float thighDefWidth, float thighDefHeight);
	void makeLeftFoot(float xLocation, float footDefSize, float calfDefSize, float calfDefLength);
	void makeRightThigh(float thighDefWidth, float thighDefHeight);
	void makeRightFoot(float xLocation, float footDefSize, float calfDefSize, float calfDefLength);
	
	Location getNewCoordinates(Location currentPosition, int angle, int length);
};



#endif
